<template>
	<view class="content page" :style="{'--color': color}">
		<!-- <status-bar title='我的订单' :back="back"></status-bar> -->
		<backTop v-if='toTop'></backTop>
		<!-- 菜单 start -->
		<scroll-view v-if='delivery' class="menu" :style="{top:0+'px'}"
			:scroll-into-view="clickNav<4?'into-0':'into-'+clickNav" scroll-x="true" scroll-with-animation='true'>
			<template v-if='delivery == "2"'>
				<view :id='"into-"+index' class="menu_itemr" v-for="(item,index) in orderTitle" :key="index"
					v-if='item.name2' @click="tabTitleNav(index,item.state)" :data-num="orderCount[item.state]"
					:class="{'unread': orderCount[item.state]}">
					<text :class="clickNav == index ? 'thmeColor thmeBorderBottom':'itemr'">{{item.name2}}</text>
				</view>
			</template>
			<template v-else>
				<view :id='"into-"+index' class="menu_itemr" v-for="(item,index) in orderTitle" :key="index"
					@click="tabTitleNav(index,item.state)" :data-num="orderCount[item.state]"
					:class="{'unread': orderCount[item.state]}">
					<text :class="clickNav == index ? 'thmeColor thmeBorderBottom':'itemr'">{{item.name}}</text>
				</view>
			</template>
		</scroll-view>
		<!-- 菜单 end -->
		<view class="order_list" style="padding-top: 88rpx;">
			<view class="order_item" v-for="(item,index) in orderItems" :key="index">
				<view class="order_state" v-if="item.type == 2 && item.group_state == 0 && item.state == 1">待成团</view>
				<!-- <view class="order_state" v-if="item.type == 2 && item.group_state == 1">拼团成功</view> -->
				<view class="order_state">
					<text v-if='item.state == 0'>待支付</text>
					<text v-if='item.state == 1 && item.delivery == 1 && item.group_state != 0'>待发货</text>
					<text v-if="item.state == 1  && item.delivery == 2 && item.group_state != 0">备货中</text>
					<!-- <text v-if='item.state == 2 && item.delivery == 2'>待取货</text> -->
					<text v-if='item.state == 2 || item.state == 3'>{{item.delivery==1?'待收货':'待取货'}}</text>
					<text v-if='item.state == 4'>待评价</text>
					<text v-if='item.state == 5'>已评价</text>
					<text v-if='item.state == 6'>退款中</text>
					<text v-if='item.state == 96'>退款成功</text>
					<text v-if='item.state == 97'>已失效</text>
					<text v-if='item.state == 98'>已取消</text>
				</view>
				<view class="order_goods">
					<view class="store_name">
						<text class="iconfont icon-dianpu"></text>
						{{item.name?item.name:shopName}}
					</view>
					<template v-if='item.type == 2 && item.groupTime > 0 && item.group_state == 0'>
						<view class="order_gbuy_info">
							<view v-if='item.personalNum>0'>还差{{item.personalNum}}人成团</view>
							<view v-if='item.personalNum==0'>已满员</view>
							<view class="order_gbuy_timer">
								<count-down startTxt='剩余' endTxt='拼团' :time="item.groupTime"
									txtColor='#ffffff'></count-down>
							</view>
						</view>
					</template>
					<block v-if="item.state == 2">
						<view class="store_nav flex-box align-center p-top10"
							v-if="item.delivery == 1 && item.courier_code == 'MySelf'">
							<text class="iconfont icon-wuliu1 p-right10 size36"></text>
							<view class="flex">
								<view class="store_nav_tel thmeColor" @click="telPhone(item.courier_tel)">
									{{item.courier_tel}}</view>
								<view @click="toUrl(`/orderPage/order/logistics?order_id=${item.order_id}`)"
									class="store_nav_addr">{{item.courier_name}}</view>
							</view>
							<text class="iconfont icon-xiangyouxiayiye"
								@click="toUrl(`/orderPage/order/logistics?order_id=${item.order_id}`)"></text>
						</view>

						<view class="store_nav flex-box align-center p-top10"
							v-if="item.delivery == 1 && item.courier_code != 'MySelf'">
							<text class="iconfont icon-wuliu1 p-right10 size36"></text>
							<view class="flex">
								<view class="store_nav_tel thmeColor">{{item.courier_name}}</view>
								<view @click="toUrl(`/orderPage/order/logistics?order_id=${item.order_id}`)"
									class="store_nav_addr">{{item.courier_num}}</view>
							</view>
							<text class="iconfont icon-xiangyouxiayiye"
								@click="toUrl(`/orderPage/order/logistics?order_id=${item.order_id}`)"></text>
						</view>


						<view class="store_nav flex-box align-center p-top10" v-if="item.delivery == 2">
							<text class="iconfont icon-daohang "></text>
							<view class="flex">
								<view class="store_nav_tel thmeColor" @click="telPhone(item.shopMobile)">
									{{item.shopMobile?item.shopMobile:service_tel}}
								</view>
								<view @click="openMaps(item)" class="store_nav_addr">
									{{item.shopAddress?item.shopAddress:shopAddress}}
								</view>
							</view>
							<text class="iconfont icon-xiangyouxiayiye" @click="openMaps(item)"></text>
						</view>
					</block>
					<view v-if='item.goodsData' @click="toDetail(item.order_id,item.table_code_id)">
						<view style="margin-bottom: 20upx;white-space: nowrap;overflow-x: auto;">
							<view v-for='(itemImg,index_Img) in item.goodsData' :key='index_Img' class="moreImgs">
								<image :src="$imgUrls(itemImg.goods_img)"></image>
								<text>x{{itemImg.goods_num}}</text>
							</view>
						</view>
					</view>
					<view class="agoods" @click="toDetail(item.order_id,item.table_code_id)" v-else>
						<view class="agoods_thumb">
							<image :src="$imgUrls(item.goods_img)" class="lest_img" mode="aspectFill"></image>
						</view>
						<view class="agoods_info">
							<view class="agoods_name lines2">
								<text class="speTag" v-if='item.type == 2'>团购</text>
								<text class="speTag" v-if='item.type == 1'>特价</text>
								{{item.goods_name}}
							</view>
							<view class="specs-show" v-if='item.specs_bind_text'>
								<text>规格：{{item.specs_bind_text}}</text>
							</view>
							<view class="agoods_info_info">
								<text class="myPrice">{{item.price}}</text>
								<view class="ff_a c_999999">x{{item.goods_num}}</view>
							</view>
						</view>
					</view>
					<!-- 待支付 -->
					<view class="order_oper" style="justify-content: flex-end;display: flex;">

						<view
							v-if="(item.state == 0 || (item.pay_type == 2 && item.state == 1)) && item.table_code_id == 0"
							class="order_oper_btn btn5" @click="show_model(item.order_id,index,0)">取消订单</view>

						<view v-if="item.state == 0" class="order_oper_btn btn6 thmeBg"
							@click="rightoffPay(item.payID)">去支付</view>

						<view
							v-if="(item.state == 1 || item.state == 2 || item.state == 3 || item.state == 4 || item.state == 5) && item.pay_type != 2"
							class="order_oper_btn btn5" @click="show_model(item.order_id,index,1)">退货退款</view>
						<!-- pay_type:2 到付 -->
						<view v-if="(item.state == 2 || item.state == 3  || item.state == 5) && item.pay_type == 2"
							class="order_oper_btn btn5" @click="show_model(item.order_id,index,1)">退货退款</view>


						<view v-if='(item.state == 2 || item.state == 3) && item.delivery == 1'
							class="order_oper_btn btn5">
							<navigator :url="'/orderPage/order/logistics?order_id='+item.order_id">查看物流</navigator>
						</view>

						<view v-if="(item.state == 2 || item.state == 3) && item.delivery == 2"
							@click="getCode(item.order_id)" class="order_oper_btn btn6 get_pickup_code thmeBg">提货码
						</view>


						<!-- <view v-if="item.state == 1  && item.delivery == 2"  
						class="order_oper_btn btn6 get_pickup_code thmeBg" :style="{'--color': color}">备货中</view> -->

						<view
							v-if="item.state == 98 || item.state == 4 || item.state == 5 || item.state == 96 || item.state == 97"
							class="order_oper_btn btn5" @click="show_model(item.order_id,index,2)">删除订单</view>


						<!-- <view v-if="item.state == 5" class="order_oper_btn btn5"
						 @click="toUrl('/commentPage/comment/commentGoods?oid='+item.order_id)">追加评论</view> -->

						<view v-if="item.state == 6" class="order_oper_btn btn6 thmeBg" @click="refunding">退款中</view>

						<view v-if='(item.state == 2 || item.state == 3) && item.delivery == 1'
							@click="show_model(item.order_id,index,3,item)" class="order_oper_btn btn6 thmeBg">确认收货
						</view>

						<view v-if="(item.state == 98 || item.state == 96) && item.rebuy_button == 1"
							@click="buyAgain(item)" class="order_oper_btn btn6 thmeBg">再次购买</view>

						<view v-if="item.state == 4"
							@click="toUrl('/commentPage/comment/commentGoods?oid='+item.order_id)"
							class="order_oper_btn btn6 thmeBg">立即评价</view>

						<!-- #ifdef MP-WEIXIN -->
						<view v-if="item.type == 2 && item.group_id != 0 && item.state == 1">
							<button :data-item="item" open-type="share" class="order_oper_btn btn6 thmeBg">去分享</button>
						</view>
						<!-- #endif -->
					</view>
				</view>
			</view>
			<view v-if='showDiLine' class="DiLine">
				------- 我也是有底线的 -------
			</view>
			<emptys v-if='noData' :title='"还没有"+tipTXt+"订单哦 ~"'></emptys>
		</view>

		<!-- 提货码弹窗 start -->
		<view class="mask flex-box flex-center align-center" v-if="getCodes">
			<view @click.stop class="pickup_code_pop"
				:style="{'background': 'url('+staticUrl+'/images/pickup_code_pop_bg.png)','background-size':'100% 100%'}">
				<view class="pickup_code_box">
					<view class="txt">请向店员出示取货二维码</view>
					<image :src="$imgUrls(codeImg)" class="code-img" mode="aspectFit"></image>
					<p class="num">{{pickCode}}</p>
				</view>
				<view @click="getCodes=false">
					<text class="iconfont icon-guanbi"></text>
				</view>
			</view>
		</view>

		<showModel type='99' v-if='showModal' :title="model.title" :msg='model.msg' :btn1='model.btn1'
			:btn2='model.btn2' @certain='certain' @cancelFunc='showModal=false'></showModel>

		<tabBar :tab="13" v-if="back == 0"></tabBar>
	</view>
</template>

<script>
	// delivery 1 快递 2 自提
	import {
		mapState
	} from 'vuex';
	var that;
	export default {
		data() {
			return {
				back: 1,
				color: getApp().globalData.color,

				toTop: false,
				getCodes: false,
				orderTitle: [{
						name: '全部',
						name2: '全部',
						state: 666
					},
					{
						name: '待支付',
						name2: '待支付',
						state: 0
					},
					{
						name: '待发货',
						name2: '',
						state: 1
					},
					{
						name: '待收货',
						name2: '待核销',
						state: 3
					},
					{
						name: '待评价',
						name2: '待评价',
						state: 4
					},

					{
						name: '已评价',
						name2: '已评价',
						state: 5
					},
					{
						name: '退款/售后',
						name2: '退款/售后',
						state: 6
					},
					{
						name: '已取消',
						name2: '已取消',
						state: 98
					},
				],
				orderCount: {},
				clickNav: 0,
				orderItems: [],
				pickCode: '',
				codeImg: '',
				noData: false, // 没有数据
				page: 1, // 分页页码
				more: false, // 是否启用上拉加载
				state: 666, // 当前列表的状态 666为全部订单

				shopName: uni.getStorageSync('startUp').title,
				service_tel: uni.getStorageSync('startUp').service_tel,
				shopAddress: uni.getStorageSync('startUp').service_address,

				imgUrl: this.imgUrl,
				staticUrl: this.staticUrl,
				showModal: false,



				showDiLine: false,
				tipTXt: '相关',
				delivery: '',

				modelType: -1,
				current_index: -1,
				current_order_id: '',
				model: {
					title: '',
					msg: '',
					btn1: '取消',
					btn2: '确定'
				}
			}
		},

		onShow() {

			// #ifdef MP
			uni.hideShareMenu();
			// #endif
			// 订单列表
			// this.getOrderList()
		},
		onLoad(e) {
			that = this
			if (e.status) {
				that.state = e.status
				that.orderTitle.forEach((item, i) => {
					if (item.state == that.state) {
						that.clickNav = i
					}
				})
			}
			if (e.back) this.back = e.back;
			that.getOrderList();
		},

		methods: {
			async show_model(id, index, type, item) {
				that.current_order_id = id
				that.current_index = index
				that.modelType = type
				if (type == 0) { // 取消
					that.model = {
						title: '是否确定取消订单？',
						msg: '可在已取消列表找到',
						btn1: '我再想想',
						btn2: '确定'
					}
					that.showModal = true
				}
				if (type == 1) { // 退货退款
					that.model = {
						title: '是否确定退货退款？',
						msg: '退货退款成功后将不可撤回',
						btn1: '我再想想',
						btn2: '退意已决'
					}
					that.showModal = true
				}
				if (type == 2) { // 删除
					that.model = {
						title: '是否确定删除该作品？',
						msg: '删除后将不可恢复!',
						btn1: '取消',
						btn2: '确定'
					}
					that.showModal = true
				}
				if (type == 3) { // 确认收货
					that.model = {
						title: '是否确定已收到宝贝？',
						msg: '确认收货后将不可撤销操作',
						btn1: '取消',
						btn2: '确认收货'
					}
					if (item.payment == 0) return that.showModal = true;
					const Result = await this.$pop.getTxConfirm(item.order_id);
					if (Result != 2) return that.showModal = true;
					if (wx.openBusinessView) {
						wx.openBusinessView({
							businessType: 'weappOrderConfirm',
							extraData: {
								transaction_id: item.transaction_id
							},
							success(e) {
								if (e.extraData.status == 'success') {
									that.receipt()
								}
								console.log('成功回调', e)
							},
							fail(err) {
								console.log(err, 'err')
							},
							complete(res) {
								console.log('确认收货接口', res)
							}
						})
					} else {
						that.$Toast('请先升级到最新的微信版本')
					}


				}
			},
			certain() { // 确定操作
				if (that.modelType == 0) { // 取消
					that.cancelSure()
				}
				if (that.modelType == 1) { // 退货退款
					that.refuseSure()
				}
				if (that.modelType == 2) { // 删除
					that.delSure()
				}
				if (that.modelType == 3) { // 确认收货
					that.receipt()
				}
			},
			buyAgain(item) {
				/*** 再次购买***/
				if (item.goodsData) { // 多商品
					var n = 0;
					var len = item.goodsData.length;
					var arr = [];
					item.goodsData.forEach((item_) => {
						that.$http.post({
							url: '/zzj_singleSaleApi/joinCart',
							data: {
								specs_bind_id: item_.specs_bind_id,
								specs_bind_text: item_.specs_bind_text,
								num: parseInt(item_.goods_num),
								goods_id: item_.goods_id,
							}
						}).then(res => {
							if (res.status) {
								n++;
								arr.push(res.car_id)
								if (n == len) { // 循环结束                            
									var adIds = arr.join(",");
									uni.setStorageSync("buyway", '');
									uni.navigateTo({
										url: '/orderPage/order/createOrders?car_id=' + adIds
									})
								}
							}
						})
					})
				} else {
					let param = '?goods_id=' + item.goods_id + '&goods_num=' + item.num
					if (item.specs_bind_id) {
						param = param + '&specs_bind_id=' + item.specs_bind_id + '&specs_bind_text=' + item.specs_bind_text
					}
					uni.navigateTo({
						url: '/orderPage/order/createOrders' + param
					})
				}
			},
			receipt(order_id, index) { // 确认收货
				that.$http.post({
					url: '/zzj_singleSaleApi/receivingGoods',
					data: {
						order_id: that.current_order_id,
					}
				}).then(res => {
					that.showModal = false
					uni.showToast({
						icon: "none",
						title: res.msg
					})
					if (res.status) {
						that.$delete(that.orderItems, that.current_index);
						uni.navigateTo({
							url: '/orderPage/order/receiptSuccess?oid=' + that.current_order_id
						})
					}
				})
			},
			cancelSure() { //取消订单
				that.$http.post({
					url: '/zzj_singleSaleApi/cancelOrder',
					data: {
						order_id: that.current_order_id,
					}
				}).then(res => {
					if (res.status) {
						if (that.clickNav == 0) { // 如果当前是全部订单则修改当前订单状态，其他状态则删除该条订单
							that.orderItems[that.current_index].state = 98;
						} else {
							that.orderItems.splice(that.current_index, 1)
							if (that.orderItems.length < 1) {
								that.noData = true
								that.showDiLine = false
							}
						}
					}
					uni.showToast({
						icon: "none",
						title: res.msg
					})
					that.showModal = false
				})
			},
			refuseSure() { // 退货退款
				that.$http.post({
					url: '/zzj_singleSaleApi/refund',
					data: {
						order_id: that.current_order_id
					}
				}).then(res => {
					if (res.status) {
						if (that.clickNav_ == 0) { // 如果当前是全部订单则修改当前订单状态，其他状态则删除该条订单
							that.orderItems[that.current_index].state = 6;
						} else {
							that.orderItems.splice(that.current_index, 1)
							if (that.orderItems.length < 1) {
								that.noData = true
								that.showDiLine = false
							}
						}
					}
					uni.showToast({
						icon: 'none',
						title: res.msg
					})
					that.showModal = false
				})
			},
			refunding() {
				uni.showToast({
					icon: 'none',
					title: '退款中，请您耐心等待~'
				})
			},
			delSure() {
				/** *删除订单* **/
				that.$http.post({
					url: '/zzj_singleSaleApi/delOrder',
					data: {
						order_id: that.current_order_id,
					}
				}).then(res => {
					if (res.errcode == 100) {
						that.orderItems.splice(that.current_index, 1);
						if (that.orderItems.length < 1) {
							that.showDiLine = false
							that.noData = true
						}
					}
					uni.showToast({
						icon: "none",
						title: res.msg
					})
					that.showModal = false;
				})
			},
			toDetail(order_id, tid) { // 跳转详情
				if (tid == 0) return that.toUrl('/orderPage/order/orderDetail?order_id=' + order_id)
				that.toUrl('/otherPage/custom/viewOrder?order_id=' + order_id + '&tid=' + tid)
			},
			tabTitleNav: function(i, state) {
				//切换导航
				that.orderItems = [];
				that.page = 1; // 页码重置
				that.clickNav = i;
				if (that.delivery == '2') {
					that.tipTXt = that.orderTitle[i].name2 == "全部" ? '相关' : that.orderTitle[i].name2
				} else {
					that.tipTXt = that.orderTitle[i].name == "全部" ? '相关' : that.orderTitle[i].name
				}
				that.state = state;
				that.getOrderList()
			},
			getCode: function(id) {
				/** * 获取提货码* **/

				that.$http.post({
					url: '/zzj_singleSaleApi/get_qrcode',
					data: {
						order_id: id,
					}
				}).then(res => {
					if (res.url) {
						that.codeImg = res.url;
						that.pickCode = res.code;
						setTimeout(function() {
							that.getCodes = true
						}, 100)
					}
				})
			},
			telPhone: function(phoneNumber) { //拨打电话
				uni.makePhoneCall({
					phoneNumber: phoneNumber
				});
			},
			openMaps: function(item) {
				uni.openLocation({
					longitude: parseFloat(item.shopPointx), //要去的经度
					latitude: parseFloat(item.shopPointy), //要去的纬度
					name: item.shopAddress,
					address: item.address
				})
			},
			getOrderList: function() { //获取订单列表
				let vid = uni.getStorageSync("vid")
				that.more = false
				that.showDiLine = false
				that.$http.post({
					url: '/zzj_singleSaleApi/orderList',
					data: {
						state: that.state,
						page: that.page,
						pagecount: 10,
					}
				}).then(res => {
					that.noData = false;
					if (res.data) {
						that.orderItems = that.orderItems.concat(res.data);
						if (res.data.length > 9) {
							that.more = true;
						}
						if (res.data.length < 10) {
							that.showDiLine = true
						}
					} else {
						if (that.orderItems.length < 1) {
							that.noData = true
						}
						if (that.orderItems.length > 0) {
							that.showDiLine = true
						}
					}
					if (res.delivery) {
						that.delivery = res.delivery
					}
					if (res.orderCount) { // 数组转对象，用orderTitle的state来匹配
						res.orderCount.forEach(item => {
							let name = item.state
							let value = item.show == 1 ? parseFloat(item.num) : 0
							this.orderCount[name] = value
						})
					}
					uni.stopPullDownRefresh()
				})
			},
			rightoffPay: function(payID) { //去支付
				// #ifdef H5
				window.location.href = 'https://sra.mogoie.com/index.php/accountPay/weChatCashierPage?orderStr=' +
					payID
				// #endif
				// #ifndef H5
				uni.navigateTo({
					url: '/moneyPage/capital/checkstand?payid=' + payID
				})
				// #endif	
			}
		},
		computed: {
			...mapState(['vid', 'System', 'navHeight'])
		},
		onShareAppMessage(res) {
			let {
				act_id,
				group_id,
				goods_id,
				goods_name,
				goods_img
			} = res.target.dataset.item
			return {
				title: goods_name,
				path: '/pages/index/index?share_v_id=' + this.vid + '&pageType=3&gid=' + goods_id + '&aid=' + act_id +
					'&group_id=' + group_id,
				imageUrl: this.$imgUrls(goods_img)
			}
		},
		onPullDownRefresh() {
			that.page = 1
			that.orderItems = []
			that.getOrderList()
		},
		onReachBottom() { // 加载更多
			if (that.more) {
				that.page += 1;
				that.getOrderList()
			}
		},

	}
</script>

<style scoped lang="scss">
	.page {
		background-color: #F8F8F8;

		.order_list {
			.order_item {
				border-radius: 10px;
				margin-bottom: 30upx;
				background: #ffffff;
				position: relative;

				.myPrice {
					font-size: 28rpx;
					color: #ff4b4e;
				}

				.order_state {
					font-size: 28upx;
					color: #ff4b4e;
					position: absolute;
					top: 30upx;
					right: 30upx;
					z-index: 1;
				}

				.order_oper {
					text-align: right;
					margin-top: 20upx;

					.btn5 {
						width: 172rpx;
						height: 60rpx;
						line-height: 58rpx;
						border: 2rpx solid #dddddd;
						border-radius: 100px;
						background: none;
						appearance: none;
						-webkit-appearance: none;
						display: inline-block;
						font-size: 28rpx;
						text-align: center;
						color: #999999;
					}

					.btn6 {
						width: 172rpx;
						height: 58rpx;
						line-height: 58rpx;
						border: none;
						border-radius: 100px;
						background: #ff4b4e;
						appearance: none;
						-webkit-appearance: none;
						display: inline-block;
						font-size: 28rpx;
						text-align: center;
						color: #ffffff;
					}

					.order_oper_btn {
						margin-left: 30upx;
					}
				}

				.order_gbuy_info {
					height: 48upx;
					border-radius: 4px;
					padding: 0 30upx;
					background: #ffbb7f;
					display: flex;
					display: -webkit-flex;
					justify-content: space-between;
					align-items: center;
					font-size: 28upx;
					font-family: arial;
					color: #ffffff;
					margin-top: 20rpx;
					margin-bottom: 10rpx;

				}
			}

		}
	}

	.agoods_info_info {
		margin-top: 10rpx;
	}

	.specs-show {
		height: 56upx;
		display: flex;
		align-items: center;
		overflow: hidden;
	}

	.specs-show text {
		font-size: 22rpx;
		color: #999;
		background-color: #EEEEEE;
		border-radius: 4upx;
		padding: 4upx 8upx;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.menu_itemr {
		padding: 10rpx 30upx 0;
		display: inline-block;
		position: relative;

		text {
			font-size: 28rpx;
			display: inline-block;
			line-height: 75rpx;
		}
	}

	.itemr {
		color: #999999;
		border-bottom: 4upx solid transparent;
	}

	.moreImgs {
		display: inline-block;
		width: calc(33% - 20upx);
		height: calc(33.33vw - 42upx);
		margin-right: 20upx;
		position: relative;
	}

	.moreImgs text {
		background: rgba(0, 0, 0, .7);
		border-radius: 20upx;
		padding: 0 10upx;
		color: white;
		line-height: 34upx;
		position: absolute;
		right: 4upx;
		bottom: 4upx;
	}

	.moreImgs image {
		width: 100%;
		height: 100%;
		display: block;
	}

	.store_name {
		width: 590upx;
	}

	.menu {
		box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);
		width: 100%;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 900;
	}

	.menu::-webkit-scrollbar {
		display: none;
	}

	.pickup_code_pop {
		position: relative;
		width: 600upx;
		height: 800upx;
		padding-top: 30rpx;

		.pickup_code_box {
			width: 100%;
			height: 100%;

			.txt {
				text-align: center;
				padding: 50upx 0;
				font-size: 32upx;
			}

			.code-img {
				width: 440upx;
				height: 440upx;
				display: block;
				margin: 20rpx auto;
				background-color: #F8F8F8;
			}

			.num {
				text-align: center;
				font-size: 32rpx;
				line-height: 80rpx;
			}
		}

		.icon-guanbi {
			color: white;
			font-size: 60rpx;
			top: 20rpx;
			position: relative;
			z-index: 3;
		}
	}

	.agoods_thumb .lest_img {
		width: 100%;
		height: 100%;
	}


	/* 门店导航 */
	.store_nav {
		margin-bottom: 20rpx;

	}

	.store_nav .store_nav_tel {
		font-size: 28rpx;

		text-decoration: underline;
		color: #ff4b4e;
	}

	.store_nav .store_nav_addr {
		display: block;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-size: 28rpx;
		color: #999999;
		position: relative;
		padding-top: 10rpx;
	}

	.icon-dianpu {
		margin-right: 12rpx;
		font-size: 34rpx;
	}

	.icon-daohang {
		margin-right: 12rpx;
		font-size: 42rpx;
	}

	.unread::after {
		left: 72% !important;
		top: 10rpx !important;
		text-align: center;
	}
</style>